<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_course_task".
 *
 * @property string $id
 * @property string $b_course_id
 * @property string $t_course_id 课程id
 * @property string $template_id 用于开课导入模板课程任务，记录模板课的任务id
 * @property string $item_top_id 单元id
 * @property string $item_id 章节id
 * @property string $task_title 标题
 * @property string $task_content 内容
 * @property int $task_score 分数
 * @property int $task_experience 经验
 * @property string $task_status 状态
 * @property string $group_way 分组方式
 * @property int $group_num 组数
 * @property int $member_num 人数
 * @property string $begin_time 开始时间
 * @property string $end_time 结束时间
 * @property string $is_public
 * @property string $task_note 备注
 * @property string $major_id 专业id
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 * @property int $old_id
 */
class TCourseTask extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_course_task';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'task_title', 'task_content', 'task_status', 'create_time'], 'required'],
            [['task_content'], 'string'],
            [['task_score', 'task_experience', 'group_num', 'member_num', 'del_flag'], 'integer'],
            [['begin_time', 'end_time', 'create_time', 'update_time'], 'safe'],
            [['id', 'b_course_id', 't_course_id', 'template_id', 'item_top_id', 'item_id', 'major_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['task_title'], 'string', 'max' => 128],
            [['task_status', 'group_way'], 'string', 'max' => 64],
            [['is_public', 'task_note'], 'string', 'max' => 255],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'b_course_id' => Yii::t('app', '组课课程id'),
            't_course_id' => Yii::t('app', '开课课程id'),
            'task_title' => Yii::t('app', '标题'),
            'task_content' => Yii::t('app', '内容'),
            'task_score' => Yii::t('app', '分数'),
            'task_experience' => Yii::t('app', '经验'),
            'task_status' => Yii::t('app', '状态'),
            'begin_time' => Yii::t('app', '开始时间'),
            'end_time' => Yii::t('app', '结束时间'),
            'task_note' => Yii::t('app', '备注'),
            'major_id' => Yii::t('app', '专业ID'),
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
            'old_id' => 'Old Id',
        ];
    }
}
